package com.marsyang.display
{	
	import org.papervision3d.cameras.Camera3D;
	import org.papervision3d.render.BasicRenderEngine;
	import org.papervision3d.scenes.Scene3D;
	import org.papervision3d.view.Viewport3D;
	
	import flash.display.Sprite;
	
	public class BaseScene extends Sprite
	{
		protected var scene:Scene3D;
		protected var render:BasicRenderEngine;
		protected var camera:Camera3D;
		protected var viewport:Viewport3D;
		
		public function BaseScene()
		{
			super();
			this.viewport = new Viewport3D(0, 0, true, true);
			this.scene = new Scene3D();
			this.camera = new Camera3D();
			this.render = new BasicRenderEngine();
			this.camera.z = 1000;
			addChild(this.viewport);
		}
		public function onRender():void{
			render.renderScene(this.scene, this.camera, this.viewport);
		}
	}
}